const { defineConfig } = require('@vue/cli-service')
const path = require('path');
module.exports = defineConfig({
  transpileDependencies: true,
  configureWebpack: {
    resolve: {
      alias: {
        'api': path.resolve(__dirname, './src/api'),
        'com': path.resolve(__dirname, './src/components'),
        'uti': path.resolve(__dirname, './src/utils'),
        'css': path.resolve(__dirname, './src/style'),
        'view': path.resolve(__dirname, './src/views'),
        'lay': path.resolve(__dirname, './src/layouts'),
        'store': path.resolve(__dirname, './src/store'),
        'router': path.resolve(__dirname, './src/router'),
      }
    }
  },
  devServer: {
    proxy: {
      '/api': {
        target: 'http://back.9yuecloud.com/admin',
        change: true,
        pathRewrite: {
          '^/api': ''
        }
      },
    }
  }
})
